package com.example.demo.Service.Impl;

import com.example.demo.Dao.CustomerDao;
import com.example.demo.Entity.CustomerEntity;
import com.example.demo.Service.CustomerService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CustomerServiceImpl implements CustomerService {
    @Resource
    CustomerDao customerDao;
    @Override
    public List<CustomerEntity> get() {
        return customerDao.get();
    }

    @Override
    public CustomerEntity getByAccounts(String accounts) {
        return customerDao.getByAccounts(accounts);
    }

    @Override
    public int updateByAccounts(String accounts, String username,String password,String avatar,String email,String gender,String telephone) {
        return customerDao.updateByAccounts(accounts, username,password,avatar,email,gender,telephone);
    }

    @Override
    public int addCustomer(String accounts, String username,String password,String avatar,String email,String gender,String telephone) {
        return customerDao.addCustomer(accounts, username,password,avatar,email,gender,telephone);
    }

    @Override
    public int deleteCustomer(String accounts) {
        return customerDao.deleteCustomer(accounts);
    }
}
